

        $(
            function () {
                fetchData(chart);
                fetchData1(chart1);
            }
        );

        function fetchData() {
            $.ajax({
                type: "GET",
                url: "http://127.0.0.1:8000/vision/bar",
                dataType: 'json',
                success: function (result) {
                    chart.setOption(result.data);
                }
            });
        }

        function fetchData1() {
            $.ajax({
                type: "GET",
                url: "http://127.0.0.1:8000/vision/line",
                dataType: "json",
                success: function (result) {
                    var options = result.data;
                    chart1.setOption(options);
                }
            });
        }
